﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace FontTool
{
    public partial class editorSettings : Form
    {

        public delegate void receiveSettingsUpdate(float value1, float value2, float value3);
        public receiveSettingsUpdate receiveUpdate;

        public editorSettings(float scaleIncr, float scaleDecr, float moveFactor)
        {
            InitializeComponent();

            textBoxScaleIncr.Text = scaleIncr.ToString();
            textBoxScaleDecr.Text = scaleDecr.ToString();
            textBoxAnchorF.Text = moveFactor.ToString();
        }

        private void buttonSave_Click(object sender, EventArgs e)
        {
            receiveUpdate(float.Parse(textBoxScaleIncr.Text), float.Parse(textBoxScaleDecr.Text), float.Parse(textBoxAnchorF.Text));
            Close();
        }

        private void buttonCancel_Click(object sender, EventArgs e)
        {
            Close();
        }
    }
}
